

****** install packages is necessary
* ssc install ivreg2
* ssc install estout
* ssc install reghdfe
* ssc install exbsample
* net install bs4rw , from(http://www.stata.com/users/jpitblado/)



****************
* Descriptives *
****************




****** Table 1: Summary statistics
use "survival data.dta", clear
keep if avail == 1
eststo clear
eststo: quietly estpost sum compliance tstop ap_within av_deaths_dist_4 echr_art_t1 echr_art_2 echr_art_4 total_art_t1 total_art_2 ///
 total_art_4 legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual ///
 numberofarticlesviolated article2violated article3violated article5violated article6violated ///
 article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 ///
 postcomworkingmethodchange postprotocol14
* using "summary_stats.tex"
esttab, cells("mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2))") ///
 compress nonumbers noobs varwidth(55) ///
 title(Summary statistics) ///
 refcat(echr_art_t1 "Number of ECtHR news reports" total_art_t1 "Total number of news reports" ///
 hits "ECtHR-related Google search volume") ///
 coeflabels(compliance "Compliance (binary)" ///
 tstop "Time until compliance (days)" ///
 ap_within "Timely action plan (binary)" ///
 av_deaths_dist_4 "Disaster news value (score)" ///
 echr_art_t1 "\enspace \dots t+1" ///
 echr_art_2 "\enspace \dots t and t+1" ///
 echr_art_4 "\enspace \dots t-1, t, t+1, and t+2" ///
 total_art_t1 "\enspace \dots t+1" ///
 total_art_2 "\enspace \dots t and t+1" ///
 total_art_4 "\enspace \dots t-1, t, t+1, and t+2" ///
 legislation "Need for legislative change (binary)" ///
 jurisprudence "Need for jurisprudential change (binary)" ///
 exe_adm "Need for executive action (binary)" ///
 publication "Need for publication (binary)" ///
 practical "Need for practical measure (binary)" ///
 property "Need for property change (binary)" ///
 reopen "Need for reopening dom. proceedings (binary)" ///
 prosecution "Need for prosecution (binary)" ///
 other_individual "Need for other individual measure (binary)" ///
 numberofarticlesviolated "Number of articles violated" ///
 article2violated "Article 2 (binary)" ///
 article3violated "Article 3 (binary)" ///
 article5violated "Article 5 (binary)" ///
 article6violated "Article 6 (binary)" ///
 article8violated "Article 8 (binary)" ///
 article10violated "Article 10 (binary)" ///
 article13violated "Article 13 (binary)" ///
 article14violated "Article 14 (binary)" ///
 protocol1_1violated "Protocol violation (binary)" ///
 postprotocol11 "After protocol 11 (binary)" ///
 postcomworkingmethodchange "After change in CoM methods (binary)" ///
 postprotocol14 "After protocol 14 (binary)") ///
 addnotes("Notes: N = 1,113, covering 30 countries between January 1992 and June 2016.")

 
 

****** Figure 1: Timing of media coverage of ECtHR rulings
use "survival data.dta", clear

keep id echr_art_m10 echr_art_m9 echr_art_m8 echr_art_m7 echr_art_m6 echr_art_m5 echr_art_m4 ///
 echr_art_m3 echr_art_m2 echr_art_m1 echr_art echr_art_t1 echr_art_t2 echr_art_t3 echr_art_t4 ///
 echr_art_t5 echr_art_t6 echr_art_t7 echr_art_t8 echr_art_t9 echr_art_t10
 
rename echr_art echr_art_t0
reshape long echr_art_, i(id) j(rel_day) string

replace rel_day = subinstr(rel_day,"m","-",.)
replace rel_day = subinstr(rel_day,"t","",.)
destring rel_day, replace
collapse (sum) echr_art_, by(rel_day)

twoway bar echr_art_ rel_day, scheme(s2mono) graphregion(color(white)) ///
 ytitle("Number of ECtHR news reports") xtitle("Number of days relative to date of ruling") ///
 ylabel(, angle(0)) scale(1.2) xline(0, lpattern(dash) lcolor(gs8))
  
 
 

****** Table A.2: Comparison of samples
use "survival data.dta", clear
bysort avail: gen cases = _N
egen a = group(respondent) if avail == 0
egen a_max = max(a) if !missing(a)
egen b = group(respondent) if avail == 1
egen b_max = max(b) if !missing(b)
gen countries = a_max
replace countries = b_max if missing(countries)
eststo clear
estpost ttest compliance tstop ap_within judgmentyear legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual ///
 numberofarticlesviolated article2violated article3violated article5violated article6violated ///
 article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 ///
 postcomworkingmethodchange postprotocol14 newdemocracy1 polconiii execap v2x_accountability ///
 nondemocracy cases countries, by(avail)
* using comparison_full_media.tex
esttab, cells("mu_1(fmt(2)) mu_2(fmt(2)) p(fmt(3))") ///
 compress nonumbers varwidth(55) noobs ///
 title(Comparison of cases with and without media data) ///
 coeflabels(compliance "Compliance (binary)" ///
 tstop "Time until compliance (days)" ///
 ap_within "Timely action plan (binary)" ///
 judgmentyear "Year of judgment" ///
 legislation "Need for legislative change (binary)" ///
 jurisprudence "Need for jurisprudential change (binary)" ///
 exe_adm "Need for executive action (binary)" ///
 publication "Need for publication (binary)" ///
 practical "Need for practical measure (binary)" ///
 property "Need for property change (binary)" ///
 reopen "Need for reopening dom. proceedings (binary)" ///
 prosecution "Need for prosecution (binary)" ///
 other_individual "Need for other individual measure (binary)" ///
 numberofarticlesviolated "Number of articles violated" ///
 article2violated "Article 2 (binary)" ///
 article3violated "Article 3 (binary)" ///
 article5violated "Article 5 (binary)" ///
 article6violated "Article 6 (binary)" ///
 article8violated "Article 8 (binary)" ///
 article10violated "Article 10 (binary)" ///
 article13violated "Article 13 (binary)" ///
 article14violated "Article 14 (binary)" ///
 protocol1_1violated "Protocol violation (binary)" ///
 postprotocol11 "After protocol 11 (binary)" ///
 postcomworkingmethodchange "After change in CoM methods (binary)" ///
 postprotocol14 "After protocol 14 (binary)" ///
 newdemocracy1 "New democracy (binary)" ///
 polconiii "Political constraints (index)" ///
 execap "Bureaucratic capacity (index)" ///
 v2x_accountability "Government accountability (index)" ///
 nondemocracy "Non-democracy (binary)" ///
 cases "Number of cases" ///
 countries "Number of countries")




****** Figure A2: Compliance over time
* Notes: Panel B of the figure shows residuals of the variables from regressions on country dummies and dummies capturing changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14). The dashed line is the linear fit.
use "survival data.dta", clear
* A: Raw values
twoway (scatter tstop judgmentyear, mcolor(gs10)) ///
       (lfit tstop judgmentyear, lpatter(dash) lcolor(black)), ///
		scheme(s2mono) graphregion(color(white)) ///
		ytitle("Time to compliance / last CoM check (days)") xtitle(" " "Year of judgment") ///
		ylabel(0(2000)8000, angle(0) gmin gmax) legend(off) scale(1.2)
* B: Residualized values
binscatter tstop judgmentyear, absorb(resp_id) control(postprotocol11 postcomworkingmethodchange postprotocol14) ///
		discrete scheme(s2mono) graphregion(color(white)) mcolor(gs10) lc(black) ///
		ytitle("Time to compliance / last CoM check (days)") xtitle(" " "Year of judgment") ///
		ylabel(-2000(2000)8000, angle(0) gmin gmax) legend(off) scale(1.2)

****** Figure A3: Disaster news value over time
use "survival data.dta", clear
* A: Raw data
twoway (scatter av_deaths_dist_4 judgmentyear, mcolor(gs10)) ///
       (lfit av_deaths_dist_4 judgmentyear, lpatter(dash) lcolor(black)), ///
		scheme(s2mono) graphregion(color(white)) ///
		ytitle("Disaster news value (score)") xtitle(" " "Year of judgment") ///
		ylabel(, angle(0) gmin gmax) legend(off) scale(1.2)
* B: Residualized values
binscatter av_deaths_dist_4 judgmentyear, absorb(resp_id) control(postprotocol11 postcomworkingmethodchange postprotocol14) ///
		discrete scheme(s2mono) graphregion(color(white)) mcolor(gs10) lc(black) ///
		ytitle("Disaster news value (score)") xtitle(" " "Year of judgment") ///
		ylabel(-0.2(0.2)0.4, angle(0) gmin gmax) legend(off) scale(1.2)
 
 


*************************************
* Regressions: media and compliance *
*************************************




****** Table 2: Effect of media coverage on compliance
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef = "Estimates in Columns (1), (2), and (4) are log hazard ratios. Column (3) shows OLS estimates."
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
rename echr_art_t1 echr_art_t1_xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
quietly eststo: stcox av_deaths_dist_4 total_art_t1 $controls_cox if !missing(echr_art_t1_xb), robust strata(resp_id)
quietly eststo: reg echr_art_t1_xb av_deaths_dist_4 total_art_t1 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
* In the OLS regressions, the country fixed effects are implemented via country dummies ("resp_id"). In Cox the models, the fixed effects are implemented through stratification on countries because the dummy variable approach would lead to inconsistent parameter estimates in the Cox model, e.g., due to the incidental parameter problem (see Allison and Christakis (2006) "Fixed-Effects Methods for the Analysis of Nonrepeated Events").
* using "reg_baseline_media.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(40) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic") sfmt(3) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(20) ///
 keep(echr_art_t1_xb av_deaths_dist_4) ///
 coeflabel(echr_art_t1_xb "Number of ECtHR news reports on t+1" av_deaths_dist_4 "Disaster news value") ///
 mtitles("Compliance (naive estimate)" "Compliance (reduced form)" "Number of ECtHR news reports on t+1 (first stage)" "Compliance (second stage)") ///
 title(Effect of media coverage on compliance) ///
 addnotes("Notes: $notes_obs $notes_coef $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")


* Bootstrapped standard errors for IV estimates
exbsample 1000, stub(rw)
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se










****** Table A.3: Effect of media coverage on compliance (placebo tests with lagged instruments)
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef_placebo = "Estimates in Columns (1), (3), (4) and (6) are log hazard ratios. Columns (2) and (5) show OLS coefficients. "
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
rename echr_art_t1 echr_art_t1_xb
quietly eststo: stcox av_deaths_dist_l4w total_art_t1 $controls_cox if !missing(echr_art_t1_xb), robust strata(resp_id)
quietly eststo: reg echr_art_t1_xb av_deaths_dist_l4w total_art_t1 $controls, robust
quietly test av_deaths_dist_l4w
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
rename echr_art_t1 echr_art_t1_xb
quietly eststo: stcox av_deaths_dist_l8w total_art_t1 $controls_cox if !missing(echr_art_t1_xb), robust strata(resp_id)
quietly eststo: reg echr_art_t1_xb av_deaths_dist_l8w total_art_t1 $controls, robust
quietly test av_deaths_dist_l8w
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
* using "reg_placebo.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic" "N Observations") sfmt(3 0) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(13) ///
 order(echr_art_t1_xb) ///
 keep(echr_art_t1_xb av_deaths_dist_l4w av_deaths_dist_l8w) ///
 refcat(av_deaths_dist_l4w "Disaster news value:") ///
 coeflabel(echr_art_t1_xb "ECtHR news reports t+1" ///
 av_deaths_dist_l4w "\enspace \dots 4 weeks before judgment" ///
 av_deaths_dist_l8w "\enspace \dots 8 weeks before judgment") ///
 mtitles("Compliance (reduced form)" "ECtHR reports t+1 (first stage)" "Compliance (second stage)" ///
 "Compliance (reduced form)" "ECtHR reports t+1 (first stage)" "Compliance (second stage)") ///
 title(Effect of media coverage on compliance (placebo tests with lagged instruments)) ///
 addnotes("Notes: $notes_obs $notes_coef_placebo $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01") 
 
 
 
 
 
exbsample 1000, stub(rw)
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_l4w total_art_t1 $controls
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se  
 
 
 
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_l8w total_art_t1 $controls
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se 
 
 
 


****** Table A.4: Effect of media coverage on compliance (alternative time windows when counting ECtHR reports)
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef_alt_window = "Columns (1), (3), and (5) show OLS coefficients. Estimates in Columns (2), (4), and (6) are log hazard ratios."
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls_alt_window = "All models include the total number of articles, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb av_deaths_dist_4 total_art_t1 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
	rename echr_art_2 echr_art_2_xb
quietly eststo: reg echr_art_2_xb av_deaths_dist_4 total_art_2 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_2_xb echr_art_2
	predict echr_art_2_xb if !missing(echr_art_2), xb
quietly eststo: stcox echr_art_2_xb total_art_2 $controls_cox, robust strata(resp_id)
	drop echr_art_2_xb
	rename echr_art_4 echr_art_4_xb
quietly eststo: reg echr_art_4_xb av_deaths_dist_4 total_art_4 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_4_xb echr_art_4
	predict echr_art_4_xb if !missing(echr_art_4), xb
quietly eststo: stcox echr_art_4_xb total_art_4 $controls_cox, robust strata(resp_id)
	drop echr_art_4_xb
* using "reg_alt_window_media.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic") sfmt(3) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(12) ///
 refcat(echr_art_t1_xb "Number of ECtHR news reports") ///
 keep(echr_art_t1_xb echr_art_2_xb echr_art_4_xb av_deaths_dist_4) ///
 order(av_deaths_dist_4 echr_art_t1_xb echr_art_2_xb echr_art_4_xb) ///
 coeflabel(echr_art_t1_xb "\enspace \dots t+1" ///
 echr_art_2_xb "\enspace \dots t and t+1" ///
 echr_art_4_xb "\enspace \dots t-1 to t+2" ///
 av_deaths_dist_4 "Disaster news value") ///
 mtitles("ECtHR reports t+1 (first stage)" "Compliance (second stage)" ///
 "ECtHR reports t and t+1 (first stage)" "Compliance (second stage)" ///
 "ECtHR reports t-1 to t+2 (first stage)" "Compliance (second stage)") ///
 title(Effect of media coverage on compliance (alternative time windows when counting ECtHR reports)) ///
 addnotes("Notes: $notes_obs $notes_coef_alt_window $notes_controls_alt_window $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")
 
 
exbsample 1000, stub(rw)
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se   
 
 
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_2 av_deaths_dist_4 total_art_2 $controls
            predict echr_art_2_xb if !missing(echr_art_2), xb
            stcox echr_art_2_xb total_art_2 $controls_cox, strata(resp_id)    
            drop echr_art_2_xb
end program

bs4rw, rw(rw*): bsses echr_art_2_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se   


set seed 999999
capture program drop bsses
program bsses
            reg echr_art_4 av_deaths_dist_4 total_art_4 $controls
            predict echr_art_4_xb if !missing(echr_art_4), xb
            stcox echr_art_4_xb total_art_4 $controls_cox, strata(resp_id)    
            drop echr_art_4_xb
end program

bs4rw, rw(rw*): bsses echr_art_4_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se   
 
 
 
 
 
 

****** Table A.5: Effect of media coverage on compliance (simple disaster instruments)
use "survival data.dta", clear

gen log_av_deaths_4 = log(1+av_deaths_4)
global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef_simple = "Columns (1) and (3) show OLS coefficients. Estimates in Columns (2) and (4) are log hazard ratios."
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear	
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb av_deaths_4 total_art_t1 $controls, robust
quietly test av_deaths_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb log_av_deaths_4 total_art_t1 $controls, robust
quietly test log_av_deaths_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox, robust strata(resp_id)
	drop echr_art_t1_xb
* using "reg_alt_naive_media.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic") sfmt(3) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(18) ///
 keep(echr_art_t1_xb log_av_deaths_4 av_deaths_4) ///
 order(av_deaths_4 log_av_deaths_4 echr_art_t1_xb) ///
 coeflabel(echr_art_t1_xb "Number of ECtHR news reports on t+1" av_deaths_4 "Number of fatalities in domestic disasters" ///
 log_av_deaths_4 "Log(1 + number of fatalities in domestic disasters)") ///
 mtitles("Number of ECtHR news reports on t+1 (first stage)" "Compliance (second stage)" ///
 "Number of ECtHR news reports on t+1 (first stage)" "Compliance (second stage)") ///
 title(Effect of media coverage on compliance (simple disaster instruments)) ///
 addnotes("Notes: $notes_obs $notes_coef_simple $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")
 

exbsample 1000, stub(rw)
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_4 total_art_t1 $controls, robust
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se  
 

set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 log_av_deaths_4 total_art_t1 $controls, robust
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox, strata(resp_id)
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se 
 
 
 
 
 
 
 
 


****** Table A.6: Effect of disasters on media coverage (binary measures)
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef_bin = "The table shows OLS coefficients."
global notes_se = "Robust standard errors are in parentheses."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

gen echr_art_t1_bin = 0
replace echr_art_t1_bin = 1 if echr_art_t1 > 0
gen av_deaths_dist_4_bin = 0
replace av_deaths_dist_4_bin = 1 if av_deaths_dist_4 > 0

eststo clear
	rename echr_art_t1_bin echr_art_t1_bin_xb
quietly eststo: reg echr_art_t1_bin_xb av_deaths_dist_4 total_art_t1 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_bin_xb echr_art_t1_bin
	predict echr_art_t1_bin_xb if !missing(echr_art_t1_bin), xb
	drop echr_art_t1_bin_xb
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb av_deaths_dist_4_bin total_art_t1 $controls, robust
quietly test av_deaths_dist_4_bin
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
	drop echr_art_t1_xb
	rename echr_art_t1_bin echr_art_t1_bin_xb
quietly eststo: reg echr_art_t1_bin_xb av_deaths_dist_4_bin total_art_t1 $controls, robust
quietly test av_deaths_dist_4_bin
	estadd scalar F_stat = r(F)
	rename echr_art_t1_bin_xb echr_art_t1_bin
	predict echr_art_t1_bin_xb if !missing(echr_art_t1_bin), xb
	drop echr_art_t1_bin_xb
* using "reg_alt_bin_media.tex"	
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(28) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic") sfmt(3) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(15) ///
 keep(av_deaths_dist_4 av_deaths_dist_4_bin) ///
 coeflabels(av_deaths_dist_4 "Disaster news value" av_deaths_dist_4_bin "Disaster yes/no") ///
 order(av_deaths_dist_4 av_deaths_dist_4_bin total_art_t1) ///
 mtitles("ECtHR reports on t+1 (yes/no)" "Number of ECtHR reports on t+1" ///
 "ECtHR reports on t+1 (yes/no)") ///
 title(Effect of disasters on media coverage (binary measures)) ///
 addnotes("Notes: $notes_obs $notes_coef_bin $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")




****** Table A.7: Effect of media coverage on compliance (controlling for year of judgment)
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_obs = "N = 1,113 rulings."
global notes_coef_year = "Columns (1) and (3) show OLS coefficients. Estimates in Columns (2) and (4) are log hazard ratios."
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb av_deaths_dist_4 total_art_t1 $controls i.judgmentyear, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox i.judgmentyear, robust strata(resp_id)
	drop echr_art_t1_xb
	rename echr_art_t1 echr_art_t1_xb
quietly eststo: reg echr_art_t1_xb av_deaths_dist_4 total_art_t1 $controls trend trend_sq trend_tri, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename echr_art_t1_xb echr_art_t1
	predict echr_art_t1_xb if !missing(echr_art_t1), xb
quietly eststo: stcox echr_art_t1_xb total_art_t1 $controls_cox trend trend_sq trend_tri, robust strata(resp_id)
	drop echr_art_t1_xb
* using "reg_alt_year.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic") sfmt(3) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(14) ///
 keep(echr_art_t1_xb av_deaths_dist_4) ///
 order(av_deaths_dist_4 echr_art_t1_xb) ///
 indicate("Year fixed effects = *judgmentyear*" "3rd order trend polynomial = trend") ///
 coeflabel(echr_art_t1_xb "ECtHR news reports on t+1" av_deaths_dist_4 "Disaster news value") ///
 mtitles("ECtHR reports on t+1 (first stage)" "Compliance (second stage)" ///
 "ECtHR reports on t+1 (first stage)" "Compliance (second stage)") ///
 title(Effect of media coverage on compliance (controlling for year of judgment)) ///
 addnotes("Notes: $notes_obs $notes_coef $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")
 
 
set seed 999999
exbsample 1000, stub(rw)
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls i.judgmentyear
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox i.judgmentyear, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se
 
 
set seed 999999
capture program drop bsses
program bsses
            reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls trend trend_sq trend_tri
            predict echr_art_t1_xb if !missing(echr_art_t1), xb
            stcox echr_art_t1_xb total_art_t1 $controls_cox trend trend_sq trend_tri, strata(resp_id)    
            drop echr_art_t1_xb
end program

bs4rw, rw(rw*): bsses echr_art_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se
 
 
 

****** Figure A.1: Effects of disaster news value on ECtHR coverage, by day relative to ruling
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"

eststo clear
quietly eststo: reg echr_art_t1 av_deaths_dist_l4 total_art_t1 $controls, robust
est sto m4
quietly eststo: reg echr_art_t1 av_deaths_dist_l3 total_art_t1 $controls, robust
est sto m3
quietly eststo: reg echr_art_t1 av_deaths_dist_l2 total_art_t1 $controls, robust
est sto m2
quietly eststo: reg echr_art_t1 av_deaths_dist_l1 total_art_t1 $controls, robust
est sto m1
quietly eststo: reg echr_art_t1 av_deaths_dist total_art_t1 $controls, robust 
est sto t
quietly eststo: reg echr_art_t1 av_deaths_dist_f1 total_art_t1 $controls, robust
est sto t1
quietly eststo: reg echr_art_t1 av_deaths_dist_f2 total_art_t1 $controls, robust
est sto t2
quietly eststo: reg echr_art_t1 av_deaths_dist_f3 total_art_t1 $controls, robust
est sto t3
quietly eststo: reg echr_art_t1 av_deaths_dist_f4 total_art_t1 $controls, robust
est sto t4

coefplot m4 m3 m2 m1 t t1 t2 t3 t4, vert keep(av_deaths_dist*) msymbol(O) ciopt(lcolor(gs8)) mcolor(black) legend(off) graphregion(color(white)) ///
 ytitle("Coefficient") yline(0, lpattern(dash) lcolor(gs8)) scale(1.2) ///
 levels(95) xtitle("Value of disaster instrument relative to date of ruling") ///
 xlabel(1 "t-4" 2 "t-3" 3 "t-2" 4 "t-1" 5 "t" 6 "t+1" 7 "t+2" 8 "t+3" 9 "t+4", angle(45))

  
 

 
 
***************************************
* Regressions: media and action plans *
***************************************
 
 
 

****** Table 3: Effect of media coverage on action planning
use "survival data.dta", clear

global controls_action = "i.judgm_month i.resp_id legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_ap_within = "\textit{Timely action plan} takes the value 1 if the respondent state submitted an action plan within six months after the ruling, and 0 otherwise."
global notes_se_single = "Robust standard errors are in parentheses. The standard errors of the IV estimates are based on a single-equation estimation procedure."
global notes_controls = "All models include the total number of news reports, dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
quietly eststo: reg ap_within av_deaths_dist_4 total_art_t1 $controls_action, robust
quietly eststo: reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls_action, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
quietly eststo: ivreg2 ap_within (echr_art_t1 = av_deaths_dist_4) total_art_t1 $controls_action, robust
quietly eststo: reg ap_within av_deaths_dist_4 total_art_t1 $controls_action if judgmentyear >= 2004, robust
quietly eststo: reg echr_art_t1 av_deaths_dist_4 total_art_t1 $controls_action if judgmentyear >= 2004, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
quietly eststo: ivreg2 ap_within (echr_art_t1 = av_deaths_dist_4) total_art_t1 $controls_action if judgmentyear >= 2004, robust
* using "reg_action.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic" "N Observations") sfmt(3 0) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(14) ///
 keep(echr_art_t1 av_deaths_dist_4) ///
 order(av_deaths_dist_4 echr_art_t1) ///
 coeflabel(echr_art_t1 "ECtHR reports on t+1" av_deaths_dist_4 "Disaster news value") ///
 mgroups("Full sample" "Only judgments as of 2004", pattern(1 0 0 1 0 0)) ///
 mtitles("Timely action plan (yes/no) (reduced form)" "Number of ECtHR reports on t+1 (first stage)" "Timely action plan (yes/no) (second stage)" ///
 "Timely action plan (yes/no) (reduced form)" "Number of ECtHR reports on t+1 (first stage)" "Timely action plan (yes/no) (second stage)") ///
 title(Effect of media coverage on action planning) ///
 addnotes("Notes: $notes_ap_within $notes_controls $notes_se_single" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")
 
 





* Table A.8: Timely submission of action plan and compliance
use "survival data.dta", clear
keep if avail == 1
global notes_cox = "The table shows log hazard ratios."
global notes_ap_within = "\textit{Timely action plan} takes the value 1 if the respondent state submitted an action plan within six months after the ruling, and 0 otherwise."
global notes_se = "Robust standard errors are in parentheses."
global notes_controls = "All models include dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
 
eststo clear
quietly eststo: stcox ap_within $controls_cox, robust strata(resp_id)
quietly eststo: stcox ap_within total_art_t1 $controls_cox, robust strata(resp_id)
* using "reg_action_compl.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(30) noobs ///
 scalars("N Observations") sfmt(0) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(20) ///
 keep(ap_within total_art_t1) ///
 coeflabel(ap_within "Timely action plan (yes/no)" ///
 total_art_t1 "Total number of news reports on t+1") ///
 mtitles("Compliance" "Compliance") ///
 title(Timely submission of action plan and compliance) ///
 addnotes("Notes: $notes_cox $notes_ap_within $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01") 
 
 
 
 
 
 
 
 
*******************
* Google searches *
*******************
 
 
 

****** Figure D.1: Relationship between Google searches and media coverage
use "survival data.dta", clear

keep id judgmentdate echr_art_m10 echr_art_m9 echr_art_m8 echr_art_m7 echr_art_m6 echr_art_m5 echr_art_m4 ///
 echr_art_m3 echr_art_m2 echr_art_m1 echr_art echr_art_t1 echr_art_t2 echr_art_t3 echr_art_t4 ///
 echr_art_t5 echr_art_t6 echr_art_t7 echr_art_t8 echr_art_t9 echr_art_t10 ///
 hits_m10 hits_m9 hits_m8 hits_m7 hits_m6 hits_m5 hits_m4 ///
 hits_m3 hits_m2 hits_m1 hits hits_t1 hits_t2 hits_t3 hits_t4 ///
 hits_t5 hits_t6 hits_t7 hits_t8 hits_t9 hits_t10
 
rename echr_art echr_art_t0
rename hits hits_t0
reshape long echr_art_ hits_, i(id) j(rel_day) string
replace rel_day = subinstr(rel_day,"m","-",.)
replace rel_day = subinstr(rel_day,"t","",.)
destring rel_day, replace

gen date = judgmentdate + rel_day
gen dow = dow(date)
gen day = day(date)

encode id, gen(id2)
tsset id2 rel_day

quietly reghdfe hits_ l(-5/5).echr_art_ l(1/5).hits_, absorb(id2)
est sto hits
coefplot hits, vert keep(*echr_art_*) msymbol(O) ciopt(lcolor(gs8)) mcolor(black) legend(off) graphregion(color(white)) ///
 ytitle("Coefficient") yline(0, lpattern(dash) lcolor(gs8)) scale(1.2) ///
 levels(95) xtitle("Day relative to ruling") ///
 xlabel(1 "t-5" 2 "t-4" 3 "t-3" 4 "t-2" 5 "t-1" 6 "t" 7 "t+1" 8 "t+2" 9 "t+3" 10 "t+4" 11 "t+5", angle(45))



 

****** Table D.1: Effect of Google searches on compliance
use "survival data.dta", clear

global controls = "i.resp_id i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global controls_cox = "i.judgm_month legislation jurisprudence exe_adm publication practical property reopen prosecution other_individual i.numberofarticlesviolated article2violated article3violated article5violated article6violated article8violated article10violated article13violated article14violated protocol1_1violated postprotocol11 postcomworkingmethodchange postprotocol14"
global notes_coef_google = "Columns (1), (3), and (5) show OLS coefficients. Estimates in Columns (2), (4), (6) are log hazard ratios."
global notes_se = "The standard errors (in parentheses) of the IV estimates are based on 1,000 Bayesian bootstrap replications, taking the full estimation procedure (first and second stage) into account. In all other cases, the standard errors are heteroscedasticity-robust analytical standard errors."
global notes_controls = "All models include dummy variables capturing the month of the judgment, country dummies, the number of articles violated, dummies capturing the kind of remedy (jurisprudential change, executive action, publication and dissemination, practical measure, domestic investigation or prosecution, return of property, reopening of domestic proceedings, other individual measure), dummies capturing the kind of violation (right to life violation, prohibition of torture violation, right to liberty violation, right to fair trial violation, right to privacy and family life violated, freedom of expression violation, right to effective remedy violation, prohibition of discrimination violation, property rights violations), and dummies accounting for changes in working methods (after protocol 11, after change in CoM working methods, after protocol 14)."

eststo clear
	rename hits_t1 hits_t1_xb
quietly eststo: reg hits_t1_xb av_deaths_dist_4 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename hits_t1_xb hits_t1
	predict hits_t1_xb if !missing(hits_t1), xb
quietly eststo: stcox hits_t1_xb $controls_cox, robust strata(resp_id)
	drop hits_t1_xb
	rename hits_2 hits_2_xb
quietly eststo: reg hits_2_xb av_deaths_dist_4 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename hits_2_xb hits_2
	predict hits_2_xb if !missing(hits_2), xb
quietly eststo: stcox hits_2_xb $controls_cox, robust strata(resp_id)
	drop hits_2_xb
	rename hits_4 hits_4_xb
quietly eststo: reg hits_4_xb av_deaths_dist_4 $controls, robust
quietly test av_deaths_dist_4
	estadd scalar F_stat = r(F)
	rename hits_4_xb hits_4
	predict hits_4_xb if !missing(hits_4), xb
quietly eststo: stcox hits_4_xb $controls_cox, robust strata(resp_id)
	drop hits_4_xb
* using "reg_alt_ext_google.tex"
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress nonotes varwidth(28) noobs ///
 scalars("F_stat Kleibergen-Paap F-statistic" "N Observations") sfmt(3 0) ///
 cells(b(fmt(3) star) se(par fmt(3))) modelwidth(12) ///
 refcat(hits_t1_xb "ECtHR-related Google search volume") ///
 keep(hits_t1_xb hits_2_xb hits_4_xb av_deaths_dist_4) ///
 order(av_deaths_dist_4 hits_t1_xb hits_2_xb hits_4_xb) ///
 coeflabels(hits_t1_xb "\enspace \dots t+1" ///
 hits_2_xb "\enspace \dots t and t+1" ///
 hits_4_xb "\enspace \dots t-1 to t+2" ///
 av_deaths_dist_4 "Disaster news value") ///
 mtitles("ECtHR searches on t+1 (first stage)" "Compliance (second stage)" ///
 "ECtHR searches t and t+1 (first stage)" "Compliance (second stage)" ///
 "ECtHR searches t-1 to t+2 (first stage)" "Compliance (second stage)") ///
 title(Effect of Google searches on compliance) ///
 addnotes("Notes: $notes_coef_google $notes_controls $notes_se" ///
 "* p$<$0.10, ** p$<$0.05, *** p$<$0.01")


set seed 999999
exbsample 1000, stub(rw)
capture program drop bsses
program bsses
            reg hits_t1 av_deaths_dist_4 $controls
            predict hits_t1_xb if !missing(hits_t1), xb
            stcox hits_t1_xb $controls_cox, strata(resp_id)    
            drop hits_t1_xb
end program

bs4rw, rw(rw*): bsses hits_t1_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se


set seed 999999
capture program drop bsses
program bsses
            reg hits_2 av_deaths_dist_4 $controls
            predict hits_2_xb if !missing(hits_2), xb
            stcox hits_2_xb $controls_cox, strata(resp_id)   
            drop hits_2_xb
end program

bs4rw, rw(rw*): bsses hits_2_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se


set seed 999999
capture program drop bsses
program bsses
            reg hits_4 av_deaths_dist_4 $controls
            predict hits_4_xb if !missing(hits_4), xb
            stcox hits_4_xb $controls_cox, strata(resp_id)    
            drop hits_4_xb
end program

bs4rw, rw(rw*): bsses hits_4_xb
esttab ., star(* 0.10 ** 0.05 *** 0.01) se
 
 

 
 
 